package algo;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * 
 * @author tim
 * 
 */
public class Compress {

	private int[] completeArray = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };

	private List<Integer> completeList = new ArrayList<Integer>();

	/**
	 * 
	 */
	public Compress() {
		initList();
	}

	/**
	 * 
	 * @param block
	 * @param zeile
	 * @param scanner
	 *            spalte
	 * @return
	 */
	public final Set<Integer> compressLists(final List<Integer> block,
			final List<Integer> zeile, final List<Integer> spalte) {
		initList();
		List<Integer> end = completeList;
		end.removeAll(block);
		end.removeAll(spalte);
		end.removeAll(zeile);
		return new HashSet<Integer>(end);
	}

	/**
	 * 
	 */
	private void initList() {
		/* init list */
		for (int i = 0; i < completeArray.length; i++) {
			completeList.add(completeArray[i]);
		}
	}

}
